<admintpl file="header" />
<style>
.home_info li em {
	float: left;
	width: 120px;
	font-style: normal;
}
li {
	list-style: none;
}
</style>
</head>
<body>
<div class="wrap">
		<table class="table table-hover table-bordered">
			<caption style="text-align:left;"><h5>用户统计</h5></caption>
			<thead>
			<tr>
				<th style="text-align:center"></th>
				<th style="text-align:center">用户总数</th>
				<th style="text-align:center">新增用户</th>
				<th style="text-align:center">活跃用户</th>
				<th style="text-align:center">对局场数</th>
			</tr>
			</thead>
			<tbody>
				<tr>
					<td style="text-align:center">今天</td>
					<td style="text-align:center">{$sumuser.jin}</td>
					<td style="text-align:center">{$adduser.jin}</td>
					<td style="text-align:center">{$loguser.jin}</td>
					<td style="text-align:center">{$dueuser.jin}</td>
				</tr>
				<tr>
					<td style="text-align:center">昨天</td>
					<td style="text-align:center">{$sumuser.zuo}</td>
					<td style="text-align:center">{$adduser.zuo}</td>
					<td style="text-align:center">{$loguser.zuo}</td>
					<td style="text-align:center">{$dueuser.zuo}</td>
				</tr>
				<tr>
					<td style="text-align:center">前天</td>
					<td style="text-align:center">{$sumuser.qian}</td>
					<td style="text-align:center">{$adduser.qian}</td>
					<td style="text-align:center">{$loguser.qian}</td>
					<td style="text-align:center">{$dueuser.qian}</td>
				</tr>
			</tbody>
		</table>
		<form method="post" class="js-ajax-form">
			<table class="table table-hover table-bordered" style="height:50px">
				<tr>
					<td>时间:
						<input type="text" class="js-datetime" name="start_time" value="{:I('request.start_time')}" style="width: 120px;" autocomplete="off">&nbsp;&nbsp;至
						<input type="text" class="js-datetime" name="end_time" value="{:I('request.end_time')}" style="width: 120px;" autocomplete="off">
					</td>
					<td>
						<input type="submit" class="btn btn-primary" value="查询" />
						<a class="btn btn-danger" href="{:U('Census/index')}">清空</a>
					</td>
				</tr>
			</table>
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th style="text-align:center">用户数量</th>
						<th style="text-align:center">售币数量</th>
						<th style="text-align:center">售卡数量</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td style="text-align:center">{$info.adduser}</td>
						<td style="text-align:center"><php> echo intval($info['actcard']);</php></td>
						<td style="text-align:center"><php> echo intval($info['salcard']);</php></td>
					</tr>	
				</tbody>
			</table>		
		</form>
		<table class="table table-hover table-bordered">
			<h5>季度/月度统计</h5>
			<thead>
			<tr>
				<th style="text-align:center">季度统计</th>
				<th style="text-align:center">月度统计</th>
			</tr>
			</thead>
			<tbody>
				<tr>
					<td style="width:50%">
						<div id="container1">
				            <div class="demo" id="quarter"></div>
				        </div>
					</td>
					<td style="width:50%">
						<div id="container2">
				            <div class="demo" id="month"></div>
				        </div>
					</td>
				</tr>
			</tbody>
		</table>
</div>
    <script src="__PUBLIC__/js/highcharts/js/highcharts.js"></script>
    <script src="__PUBLIC__/js/highcharts/js/modules/exporting.js"></script>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/js/highcharts/css/common.css" />
	<script src="__PUBLIC__/js/common.js"></script>
	<php>
		$lang_set=defined('LANG_SET')?LANG_SET:'';
		$thinkcmf_version=defined('THINKCMF_VERSION')?THINKCMF_VERSION:'';
	</php>
	<script>
	$(function() {
		$.ajax({
            type: "get",
            url: "__URL__/quartercount",
            dataType: "json",
            success: function(data) {
            	if(data.status == "10001"){
            		$('#quarter').highcharts(data.result);
                }
            	return false;
            }
        });
		$.ajax({
            type: "get",
            url: "__URL__/monthcount",
            dataType: "json",
            success: function(data) {
           		if(data.status == "10001"){
           			$('#month').highcharts(data.result);
                }
           		return false;
            }
        });
    });
	</script>
</body>
</html>